﻿using Castle.DynamicProxy;
namespace Framework.LinkTrackingLog.MyTest
{
    /// <summary>
    /// 方法监控服务接口
    /// </summary>
    public interface IMethodMonitoringService
    {
        /// <summary>
        /// 开始监控
        /// </summary>
        /// <param name="methodName"></param>
        /// <param name="className"></param>
        /// <returns></returns>
        public IDisposable MonitoringService(string methodName, string className);

        /// <summary>
        /// 获取监控信息
        /// </summary>
        /// <returns></returns>
        public IEnumerable<MethodMonitoringModel> GetMethodMonitorings();

        /// <summary>
        /// 开始Action监控
        /// </summary>
        /// <param name="methodName">Action名称</param>
        /// <param name="className">控制器类名</param>
        public void StartMonitoring(string methodName, string className);

        /// <summary>
        /// 结束Action监控
        /// </summary>
        /// <param name="methodName">Action名称</param>
        /// <param name="className">控制器类名</param>
        public void StopMonitoring(string methodName, string className);

        /// <summary>
        /// 执行异常
        /// </summary>
        /// <param name="e"></param>
        public void Execute(Exception e);
    }
}
